reset 
set data style lines  
set nokey
set xrange [0:30]
set xtics 1
set yrange [0:8]
set ytics 1
set grid
S0(x) = 4.5 + (1.10573)*(x - (17)) + (0)*(x - (17))**2 + (-0.0302668)*(x - (17))**3
S1(x) = 7 + (0.288531)*(x - (20)) + (-0.272401)*(x - (20))**2 + (0.025408)*(x - (20))**3
S2(x) = 6.1 + (-0.659859)*(x - (23)) + (-0.0437292)*(x - (23))**2 + (0.203589)*(x - (23))**3
S3(x) = 5.6 + (-0.136552)*(x - (24)) + (0.567036)*(x - (24))**2 + (-0.230484)*(x - (24))**3
S4(x) = 5.8 + (0.306068)*(x - (25)) + (-0.124416)*(x - (25))**2 + (-0.0893088)*(x - (25))**3
S5(x) = 5.2 + (-1.2633)*(x - (27)) + (-0.660269)*(x - (27))**2 + (0.314414)*(x - (27))**3
Sp0(x) = ( x >= 16.9 && x <= 20.1) ? S0(x) : 0/0
Sp1(x) = ( x >= 19.9 && x <= 23.1) ? S1(x) : 0/0
Sp2(x) = ( x >= 22.9 && x <= 24.1) ? S2(x) : 0/0
Sp3(x) = ( x >= 23.9 && x <= 25.1) ? S3(x) : 0/0
Sp4(x) = ( x >= 24.9 && x <= 27.1) ? S4(x) : 0/0
Sp5(x) = ( x >= 26.9 && x <= 27.8) ? S5(x) : 0/0
plot 'pontos.txt' using 1:2 t 'pontos' with points pt(7) lt(8)
replot Sp0(x)
replot Sp1(x)
replot Sp2(x)
replot Sp3(x)
replot Sp4(x)
replot Sp5(x)
pause -1  
set out 'splineCubicaMono.eps' 
set term post mono 'Times-Roman' 18 
replot